<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html>
	<head>
		<!-- Basic Page Needs -->
		<meta charset="utf-8">
		<title>电影列表</title>
		<meta name="description" content="A Template by Gozha.net">
		<meta name="keywords" content="HTML, CSS, JavaScript">
		<meta name="author" content="Gozha.net">

		<!-- Mobile Specific Metas-->
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta content="telephone=no" name="format-detection">
		
		<link rel="stylesheet" href="layui/css/layui.css" media="all">

		<!-- Fonts -->
		<!-- Font awesome - icon font -->
		<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
		<!-- Roboto -->
		<link href='http://fonts.useso.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>

		<!-- Stylesheets -->
		<!-- jQuery UI -->
		<link href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" rel="stylesheet">

		<!-- Mobile menu -->
		<link href="css/gozha-nav.css" rel="stylesheet" />
		<!-- Select -->
		<link href="css/external/jquery.selectbox.css" rel="stylesheet" />
		
		<link href="css/style-before.css?v=1" rel="stylesheet" />

		<!-- Custom -->
		<link href="css/style.css?v=1" rel="stylesheet" />

		<!-- Modernizr -->
		<script src="js/external/modernizr.custom.js"></script>

		<!-- REVOLUTION BANNER CSS SETTINGS -->
		<link rel="stylesheet" type="text/css" href="rs-plugin/css/settings.css" media="screen" />
		<script type="text/javascript" src="js/jquery-2.0.3.js"></script>
		
		<script type="text/javascript" src="js/jquerysession.js"></script>
	</head>

	<body>
		<div class="wrapper">
			<!-- Banner -->
			<!-- Header section -->
			<header class="header-wrapper">
				<div class="container">
					<!-- Logo link -->
					<a href='main-general.jsp' class="logo">
		                 <img alt='logo' src="themovieimg/logo.png">
		             	<span style="color: white;margin-left: 70px;font-size: 20px;font-family: 幼圆;"><b>爆米花票务</b></span>
             		</a>

					 <!-- Main website navigation-->
             <nav id="navigation-box">
                 
                 <!-- Link navigation -->
                 <ul id="navigation">
                	 <li>
                         <span class="sub-nav-toggle plus"></span>
                         <a href="main-general.jsp">首页</a>
                     </li>
                     <li>
                         <span class="sub-nav-toggle plus"></span>
                         <a href="#">电影信息</a>
                         <ul>
                             <li class="menu__nav-item"><a href="movie-list-left.jsp">全部电影</a></li>
                             <li class="menu__nav-item"><a href="movie-playing-general.jsp">正在热映</a></li>
                         </ul>
                     </li>
					<li>
					    <span class="sub-nav-toggle plus"></span>
					    <a href="#">排行榜</a>
					    <ul>
					    	<li class="menu__nav-item"><a href="rates-left-hotsaleslist-general.jsp">上映销量榜</a></li>
					        <li class="menu__nav-item"><a href="rates-left-highscorelist-general.jsp">上映高分榜</a></li>
					        <li class="menu__nav-item"><a href="rates-left-collectionlist-general.jsp">收藏榜</a></li>
					    </ul>
					</li>
					<li>
					    <span class="sub-nav-toggle plus"></span>
					    <a href="offers.jsp">关于会员</a>
					   
					</li>
					<li>
					    <span class="sub-nav-toggle plus"></span>
					    <a href="contact.jsp">关于我们</a> 
					</li>
                 </ul>
             </nav>        	

             <c:choose>
             	<c:when test="${empty username}">
             		<!-- Additional header buttons / Auth and direct link to booking-->
	                <div class="control-panel" id="nologin">
						<a href="#" class="btn btn-md btn--warning btn--book btn-control--home login-window">登录</a>
					</div>
             	</c:when>
             	
             	<c:otherwise>
             		<!-- Additional header buttons / Auth and direct link to booking-->
	               <div class="control-panel" id="logined" >
	                   <div class="auth auth--home">
	                     <div class="auth__show">
	                       <span class="auth__image">
	                         <img id="uimg" alt="" src="<%=session.getAttribute("userpic")%>">
	                       </span>
	                     </div>
	                     <a id="un" href="#" class="btn btn--sign btn--singin">
	                      		<%=session.getAttribute("username") %>
	                     </a>
	                       <ul class="auth__function">
	                           <li><a href="account.jsp" class="auth__function-item">个人中心</a></li>
	                           <li><a href="javascript:;" onclick="logout()" class="auth__function-item">退出登陆</a></li>
	                       </ul>
	                   </div>
	               </div>
             	</c:otherwise>
             
             </c:choose>

           </div>
     	</header>

			<!-- Search bar -->
			<div class="search-wrapper">
				<div class="container container--add">
					<form id='search-form' method='get' class="search">
						<input type="text" class="search__field" placeholder="搜索全部电影" id="autocomplete"> 
							<select name="sorting_item" id="search-sort" class="search__sort">
							<option value="moviename">根据电影名</option>
							<option value="mTypeName">根据电影类型</option>
							<option value="director">根据导演</option>
							<option value="mainactor">根据演员</option>
							<option value="place">根据地区</option>
							<option value="language">根据语言</option>
						</select>
						<button type="button" class="btn btn-md btn--danger search__button"
							style="margin-right: 50px;" id="search">搜索电影</button>
					</form>
				</div>
			</div>

		<!-- Main content -->
			<section class="container">
				<div class="col-sm-8 col-md-9">
					<h2 class="page-heading" id="allnum"></h2>


					<div class="tags-area">
						<div class="tags tags--unmarked">
							<span class="tags__label">分 类:</span>
							<ul> 
								<li class="item-wrap"><a href="javascript:void(0);" onclick="getmslist(0);" class="tags__item item-active" id="allm">全部</a></li>
								<li class="item-wrap"><a href="javascript:void(0);" onclick="getmslist(3);" class="tags__item" name="anniu" id="class3">即将上映</a></li>
								<li class="item-wrap"><a href="javascript:void(0);" onclick="getmslist(1);" class="tags__item" name="anniu" id="class1">上映中</a></li>
								<li class="item-wrap"><a href="javascript:void(0);" onclick="getmslist(2);" class="tags__item" name="anniu" id="class2">已下架</a></li>
							</ul>
						</div>
					</div>
			
					<!-- 电影详情页 -->
					<div class="movie movie--preview release" id="maininfo"></div>


					<!-- end movie preview item -->
					<div class="coloum-wrapper" id="fenye"></div>

				</div>

				<aside class="col-sm-4 col-md-3">
					<div class="sitebar">
						<div class="category category--discuss category--count marginb-sm mobile-category ls-cat">
							<h3 class="category__title">今日热销榜</h3>
							<ol id="moviestoday" style="padding-left:53px;">

							</ol>
						</div>

						<div class="category category--cooming category--count marginb-sm mobile-category rs-cat">
							<h3 class="category__title">即将上映高分榜</h3>
							<ol id="moviessoon" style="padding-left:53px;">

							</ol>
						</div>



					</div>
				</aside>

			</section>

			<div class="clearfix"></div>
			
        <jsp:include page="footer.jsp"></jsp:include>
		
		<!-- JavaScript-->
		<!-- jQuery 1.9.1-->
		<script src="http://ajax.useso.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
		<script>
			window.jQuery || document.write('<script src="js/external/jquery-1.10.1.min.js"><\/script>')
		</script>
		<!-- Migrate -->
		<script src="js/external/jquery-migrate-1.2.1.min.js"></script>
		<!-- jQuery UI -->
		<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
		<!-- Bootstrap 3-->
		<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>
		<!-- jQuery REVOLUTION Slider -->
		<script type="text/javascript" src="rs-plugin/js/jquery.themepunch.plugins.min.js"></script>
		<script type="text/javascript" src="rs-plugin/js/jquery.themepunch.revolution.min.js"></script>
		<!-- Mobile menu -->
		<script src="js/jquery.mobile.menu.js"></script>
		<!-- Select -->
		<script src="js/external/jquery.selectbox-0.2.min.js"></script>

		<!-- Stars rate -->
		<script src="js/external/jquery.raty.js"></script>

		<!-- Form element -->
		<script src="js/external/form-element.js"></script>
		<!-- Form validation -->
		<script src="js/form.js"></script>
		
		<script src="js/customf.js"></script>
		  
		<script type="text/javascript" src="js/jquery.cookie.js"></script> 
		
		<script src="layui/layui.js" charset="utf-8"></script> 
		
		<jsp:include page="LoginAndRegister.jsp"></jsp:include>
		<jsp:include page="JudegeLogin.jsp"></jsp:include>
		<!-- Custom -->
		<script src="js/custom.js"></script>
		
		<script type="text/javascript">
			$(document).ready(function() {
				init_Home();
			});
		</script>
		
		<script type="text/javascript">
            $(document).ready(function() {
                init_MovieList();
            });
		</script>
		<script type="text/javascript">
			function changeTime(time){
			    if(time){
			        var oDate = new Date(time*1),
			            oYear = oDate.getFullYear(),
			            oMonth = oDate.getMonth()+1,
			            oDay = oDate.getDate()
			            oTime = oYear +'-'+ getBz(oMonth) +'-'+ getBz(oDay);//拼接时间
			        return oTime;
			    }else{
		       		 return "";
			    }
			}
			//时间补零
			function getBz(num){
			    if(parseInt(num) < 10){
			        num = '0'+num;
			    }
			    return num;
			}
		</script>
		
		<script type="text/javascript">
			//封装电影列表的展示
			function getMList(data){
				//清空
				$("#maininfo").text("");
				$.each(data.data,function(i,v){
					//获取电影的评分
					var movieScore=getmscore(v.movieid);
					if(movieScore==null){
						movieScore=0;
					}
					//查询电影的类别
					var movieType=getmtype(v.movieid);
					//查询有多少人看过
					var ticketNum=getmtcount(v.movieid);
					
					v.releasedate = changeTime(v.releasedate);
					//拼接
					$("#maininfo").append("<div class='col-sm-5 col-md-3'><div class='movie__images'>"
						+"<a href='movie-page-full.jsp?movieid="+v.movieid+"'><img alt='' src='"+v.moviepicture+"'></a></div></div>"
						+"<div class='col-sm-7 col-md-9'>"
						+"<a href='movie-page-full.jsp?movieid="+v.movieid+"' class='movie__title link--huge'>"+v.moviename+"</a>"
						+"<p class='movie__time' style='position: absolute;margin-left: 105px;margin-top: 8px;'>"+v.duration+" 分钟</p>"
						+"<p class='movie__option'  style='margin-top: 10px;'>"
						+"<strong>地区：</strong><a href='#'>美国</a></p>"
						+"<p class='movie__option'><strong>语言：</strong><a href='#'>"+v.language+"</a></p>"
						+"<p class='movie__option'><strong>类别：</strong><a href='#'>"+movieType+"</a></p>"
						+"<p class='movie__option'><strong>上映日期：</strong>"+v.releasedate+"</p>"
						+"<p class='movie__option'><strong>导演：</strong><a href='#'>"+v.director+"</a></p>"
						+"<p class='movie__option'><strong>主演：</strong><a href='#'>"+v.mainactor+"</a></p>"
						+"<span class='movie__rate-number'>"+ticketNum+"人看过</span>"
						+"<div class='movie__btns'>"
						+"<a href='javascript:updmcoll("+v.movieid+");' style='font-size: 16px;' id='rate"+v.movieid+"'></a></div>"
						+"<div class='preview-footer'>"
						+"<div class='movie__rate'>"
						+"<div id='"+v.movieid+"' style='position: absolute;'></div><p></p>"
						+"<span class='movie__rating' style='margin-left: 10px;'>"+movieScore+"</span>"
						+"</div></div></div><div>&nbsp;</div><div>&nbsp;</div>");
					//给星星赋值
					 layui.use(['rate'], function() {
						var rate = layui.rate;
						rate.render({
							elem: '#'+v.movieid,
							length: 5,
							value: movieScore,
							half: true //开启半星
								,
							readonly: true
						});

					}); 
					var userId = <%=session.getAttribute("userid")%>
					//判断用户是否有收藏，初始化界面
					$.ajax({
						url:"docoll",
						type:"POST",
						contentType:"application/json",
						data:JSON.stringify({
							 users: {
					                userid: userId
					         },
					         movies: {
					                movieid: v.movieid
					         }
						}),
						success:function(data){
							if(data==0){
								$("#rate"+v.movieid).append(""
								+"<i class='layui-icon layui-icon-star' style='font-size: 25px; color: rgb(255, 184, 0);'>"
								+"</i>&nbsp;点击收藏");
							}else if(data!=0){
								$("#rate"+v.movieid).append(""
									+"<i class='layui-icon layui-icon-star-fill' style='font-size: 25px; color: rgb(255, 184, 0);'>"
									+"</i>&nbsp;取消收藏");
							}
							
						},
						dataType:"json"
					});
					
				});
				//拼接电影条数
				$("#allnum").text("");
				$("#allnum").append("全部电影 ( "+data.count+" )");
			}

			$(function(){
			
				//获取全部电影,初始化界面
				$.ajax({
					url:"smbl",
					type:"POST",
				
					data:({
	
					}),
					success:function(data){
						
						//调取电影展示的函数
						getMList(data);
			
						//分页按钮拼接
						$("#fenye").append("<div class='pagination paginatioon--full'><a href='javascript:getPrevPage("+data.page+","+data.totalPage+");' class='pagination__prev'>prev</a>"
								+"<a href='javascript:getNextPage("+data.page+","+data.totalPage+");' class='pagination__next'>next</a></div>");
						
					},
					dataType:"json"
				});
				
			});
			
			//获取电影的评分
			function getmscore(movieId){
				var result="";
				$.ajax({
					type:"GET",
					url:"getmscore",
					data:{
						movieId:movieId
					},
					async : false,
					success:function(data){
						//给result赋值
						if(data == ""){
							result = 0;
						}else{
							result=data[0].score ;	
						}
						
					},
					dataType:"json"
				});
				return result;
			}
			
			//获取该电影有多少人看过
			function getmtcount(movieId){
				var result;
				$.ajax({
					type:"GET",
					url:"getmtnum",
					data:{
						movieId:movieId
					},
					async : false,
					success:function(data){
						//给result赋值
						result=data ;
					},
					dataType:"json"
				});
				return result;
			}
			
			//获取电影的类别
			function getmtype(movieId){
				var result="";
				$.ajax({
					type:"GET",
					url:"getmtypes",
					data:{
						movieId:movieId
					},
					async : false,
					success:function(data){
						//对返回值进行拼接
						for(var i=0;i<data.length;i++){
							if(i==0){
								result+=data[i].moviename;
							}else{
								result+=" | "+data[i].moviename;
							}
						}
						
					},
					dataType:"json"
				});
				return result;
			}

			//分页生成新的页面，下一页点击调取的函数
			function getNextPage(page,totalPage,keys,select,moviestatus){
				
				//自增
				page+=1;
				//判断用户当前是否还有分页
				if(page<=totalPage){
					//刷新下一页
					freshNext(page,keys,select,moviestatus);
					//提示
					layui.use('layer', function(){
						  var layer = layui.layer;
						  
						  layer.msg('第'+page+'页');
						});
					
				}else{
					//提示
					layui.use('layer', function(){
						  var layer = layui.layer;
						  
						  layer.msg('没有更多啦');
						});
				}
				
			}
			//分页生成新的页面，上一页点击调取的函数
			function getPrevPage(page,totalPage,keys,select,moviestatus){
				//判断用户当前是否还有分页
				//自增
				page=page-1;
				//判断用户当前是否还有分页
				if(page>0){
					
					//刷新上一页
					freshNext(page,keys,select,moviestatus);
					//提示
					layui.use('layer', function(){
						  var layer = layui.layer;
						  
						  layer.msg('第'+page+'页');
						});
					
					
				}else{
					//提示
					layui.use('layer', function(){
						  var layer = layui.layer;
						  
						  layer.msg('当前是第1页');
						});
				}
				
			}
			//刷新下一页
			function freshNext(page,keys,select,moviestatus){
				
				//获取全部电影
				$.ajax({
					url:"getmsl",
					type:"POST",
					
					data:{
						 "page": page,
						 "keywords":keys,
						 "movies":select,
						 "moviestatus":moviestatus
					},
					success:function(data){
						
						//调取电影展示的函数
						getMList(data);
						
						//清空
						$("#fenye").text("");
						//分页按钮拼接
						$("#fenye").append("<div class='pagination paginatioon--full'><a href='javascript:getPrevPage("+data.page+","+data.totalPage+",\""+keys+"\",\""+select+"\","+moviestatus+");' class='pagination__prev'>prev</a>"
								+"<a href='javascript:getNextPage("+data.page+","+data.totalPage+",\""+keys+"\",\""+select+"\","+moviestatus+");' class='pagination__next'>next</a></div>");
						
					},
					dataType:"json"
				});
			}
		</script>
		
		<script type="text/javascript">
		
		// 改变收藏状态的函数
		function updmcoll(movieId){

			//用户id
			var userId = <%=session.getAttribute("userid")%> ;
			
			//获取用户当前的收藏状态,这边要填电影id，用户id
			var collstatus=getmcoll(movieId,userId);
			
			//如果返回值为0，说明用户没收藏，所以要添加收藏
			if(collstatus==0){
				$.ajax({
					url:"addct",
					type:"POST",
					contentType:"application/json",
					data:JSON.stringify({
						 users: {
				                userid: userId
				         },
				         movies: {
				                movieid: movieId
				         }
					}),
					success:function(data){
						//清空文本
						$("#rate"+movieId).text("");
						//追加
						$("#rate"+movieId).append(""
							+"<i class='layui-icon layui-icon-star-fill' style='font-size: 25px; color: rgb(255, 184, 0);'>"
							+"</i>&nbsp;取消收藏");
						if(data.code==200){
							layui.use('layer', function(){
								  var layer = layui.layer;
								  
								  layer.msg('收藏成功！可到我的收藏查看');
								});	
						}
					},
					dataType:"json"
				});
			}
			//如果返回值为1，说明用户已经收藏，所以要取消收藏
			if(collstatus!=0){
				$.ajax({
					url:"delctbyum",
					type:"POST",
					contentType:"application/json",
					data:JSON.stringify({
						 users: {
				                userid: userId
				         },
				         movies: {
				                movieid: movieId
				         }
					}),
					success:function(data){
						//清空文本
						$("#rate"+movieId).text("");
						//追加
						$("#rate"+movieId).append(""
							+"<i class='layui-icon layui-icon-star' style='font-size: 25px; color: rgb(255, 184, 0);'>"
							+"</i>&nbsp;点击收藏");
						
						if(data.code==200){
							layui.use('layer', function(){
								  var layer = layui.layer;
								  
								  layer.msg('取消收藏成功');
								});
						}
					},
					dataType:"json"
				});
			}
		}
		
		//获取用户当前是否收藏的状态
		function getmcoll(movieId,userId){
			var result="";
			$.ajax({
				url:"docoll",
				type:"POST",
				contentType:"application/json",
				data:JSON.stringify({
					 users: {
			                userid: userId
			         },
			         movies: {
			                movieid: movieId
			         }
				}),
				async : false,
				success:function(data){
					//给result赋值
					result=data;
				},
				dataType:"json"
			});
			return result;
		}
		
		//获取焦点的时候进行ajax的查询联想词
		$("#autocomplete").focus(function() {
			var type = $("#search-sort").val();

			//动态键传值
			var data = {};
			key = type;
			value = type;
			data[key] = value;
			$.ajax({
				url : "gws",
				type : "post",
				dataType : "json",
				data : data,

				success : auto
			})
		});
		
		//点击联想词直接搜索
		function auto(data) {
			
			console.log(data);
			$("#autocomplete").autocomplete({
				source : data,
				select : function(event, ul) {
				
					var type = $("#search-sort").val();

					var keys = ul.item.value;

					$.ajax({
						url : "smbl",
						type : "post",
						dataType : "json",
						data : {
							"movies" : type,
							"keywords" : keys
						},
						success : function(data) {
							if(data.count==0){
								
								layui.use('layer', function(){
										 var layer = layui.layer;
										 layer.msg('没有该电影');
								});
								//清空
								$("#fenye").text("");
								
							}
							
							//设置全部按钮点亮
							$("#allm").attr("class","tags__item item-active");
							$("a[name='anniu']").attr("class","tags__item");
						
							//调取电影展示的函数
							getMList(data);
							
							//清空
							$("#fenye").text("");
							//分页按钮拼接
							$("#fenye").append("<div class='pagination paginatioon--full'><a href='javascript:getPrevPage("+data.page+","+data.totalPage+",\""+keys+"\",\""+type+"\");' class='pagination__prev'>prev</a>"
									+"<a href='javascript:getNextPage("+data.page+","+data.totalPage+",\""+keys+"\",\""+type+"\");' class='pagination__next'>next</a></div>");
							
							
						}
					})
				}
			});
		}

		//搜索按钮点击搜索事件
		$("#search").click(function() {
			//设置全部按钮点亮
			$("#allm").attr("class","tags__item item-active");
			$("a[name='anniu']").attr("class","tags__item");
			
			var keywords = $("#autocomplete").val();
			var type = $("#search-sort").val();
			
			console.log("type:" + type);
			$.ajax({
				url : "smbl",
				type : "post",
				dataType : "json",
				data : {
					"movies" : type,
					"keywords" : keywords
				},
				success : function(data) {
					if(data.count==0){
						
						layui.use('layer', function(){
								 var layer = layui.layer;
								  
								 layer.msg('没有该电影');
						});
						
					}
					
					//调取电影展示的函数
					getMList(data);
						
					//清空
					$("#fenye").text("");
					//分页按钮拼接
					$("#fenye").append("<div class='pagination paginatioon--full'><a href='javascript:getPrevPage("+data.page+","+data.totalPage+",\""+keywords+"\",\""+type+"\");' class='pagination__prev'>prev</a>"
							+"<a href='javascript:getNextPage("+data.page+","+data.totalPage+",\""+keywords+"\",\""+type+"\");' class='pagination__next'>next</a></div>");
					
				}
			});
		});
		
		//用于点击电影的状态展示
		function getmslist(moviestatus){
			
			$("#allm").removeClass("item-active");
			$("#class1").removeClass("item-active");
			$("#class2").removeClass("item-active");
			$("#class3").removeClass("item-active");
			if(moviestatus == 0){
			  $("#allm").addClass("item-active");
			}else{
			  $("#class"+moviestatus).addClass("item-active");
			}
			
			//输入框的值
			var keywords = $("#autocomplete").val();
			
			//用户选择搜索的方式
			var type = $("#search-sort").val();
			
			//获取全部电影,初始化界面
			$.ajax({
				url:"getmsl",
				type:"POST",
				data:({
					"movies" : type,
					"keywords" : keywords,
					"moviestatus":moviestatus
				}),
				success:function(data){
					
					console.log(data);
					//调取电影展示的函数
					getMList(data);
					
					//清空
					$("#fenye").text("");
					//分页按钮拼接
					$("#fenye").append("<div class='pagination paginatioon--full'><a href='javascript:getPrevPage("+data.page+","+data.totalPage+",\""+keywords+"\",\""+type+"\","+moviestatus+");' class='pagination__prev'>prev</a>"
							+"<a href='javascript:getNextPage("+data.page+","+data.totalPage+",\""+keywords+"\",\""+type+"\","+moviestatus+");' class='pagination__next'>next</a></div>");
					
				},
				dataType:"json"
			});
		}
		
		</script>
		
		<script type="text/javascript">
			$(function(){
				//获取今日排行
				$.get("getmtoday",function(data){
					$.each(data,function(i,v){
						//拼接
						$("#moviestoday").append("<li style='margin-left:-40px'><a href=movie-page-full.jsp?movieid="+v.movieid+" class='category__item'>"+(i+1)+"、"+v.moviename+"</a></li>");
					});
					
				});
				//获取即将上映的高分榜
				$.get("getmsoon",function(data){
					console.log(data);
					$.each(data,function(i,v){
						//拼接
						$("#moviessoon").append("<li style='margin-left:-40px'><a href=movie-page-full.jsp?movieid="+v.movieid+" class='category__item'>"+(i+1)+"、"+v.moviename+"</a></li>");
					});
					
				});
			});
		</script>
		
		<script type="text/javascript">

			$("#uimg").attr("src",$.session.get("userpic"));
			
			$("#un").text($.session.get("username"));
		
		</script>

	</body>
</html>
